import BaseComponent from "../Base/BaseComponent";
import './syle/index.less';
import Icon from "../Base/Icon/Icon";
import cx from 'classnames';
import logoImg from 'assets/images/logo.png';
import { Link } from 'dva/router';

export default class LeftNavBar extends BaseComponent {

  render() {
    const {onCollapseLeftSide, hideSideBar} = this.props;

    const classnames = cx('left-navbar', {'open': !hideSideBar});

    return (
      <div className={classnames}>
        <Link className={"link"} to="/">
          {!hideSideBar && <img className={"image"} src={logoImg} alt="logo" />}
          {/*{!hideSideBar && <b className={"name"}>LIS系统</b>}*/}
        </Link>

        <span className='toggle_sidemenu' onClick={onCollapseLeftSide}>
            <Icon type="bars"/>
          </span>
      </div>
    );
  }
}
